package com.example.i.spy;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

public class HelpScreen2 extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) 
    {
    	// create the activity and load its layout.
        super.onCreate(savedInstanceState);
        // lock the display orientation.
        this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
        setContentView(R.layout.activity_help_screen2);
        
        //the functionality for the previous button
        Button previousButton = (Button) findViewById(R.id.previousPage);
        previousButton.setOnClickListener(new View.OnClickListener() {
			
        	// once this is clicked, destroy the current activity so the previous one can be loaded.
			public void onClick(View v) 
			{
				finish();
			}
		});
        
        // the functionality for the main menu button
        Button mainMenuButton = (Button) findViewById(R.id.mainMenuHelpScreen2);
        mainMenuButton.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) 
			{
				Intent intent = new Intent(HelpScreen2.this, MainMenuActivity.class);
				startActivity(intent);
			}
		});
        
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) 
    {
        getMenuInflater().inflate(R.menu.activity_help_screen2, menu);
        return true;
    }
}
